#include <cpp-httplib/httplib.h>
#include <unordered_map>
#include "server.hh"
#include "contact.pb.h"

const std::string svr_host = "0.0.0.0";
const int svr_port = 8989;

int main()
{
    httplib::Server server;
    
    server.Post("/contacts/add", addContact);

    server.Post("/contacts/delete", delContact);

    server.Get("/contacts/list", viewContactList);

    server.Get("/contacts/list/(.+)", viewContact);

    server.listen(svr_host, svr_port);

    return 0;
}
